package com.goldcn.goods.dao;

import com.goldcn.goods.dto.ClazzImageDto;
import com.goldcn.goods.dto.ClazzValDto;
import com.goldcn.goods.model.GoodsClassifyCommission;
import com.goldcn.goods.vo.ClazzRateVo;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

public interface GoodsClassifyCommissionMapper {
    int deleteByPrimaryKey(Long ID);

    int insert(GoodsClassifyCommission record);

    int insertSelective(GoodsClassifyCommission record);

    GoodsClassifyCommission selectByPrimaryKey(Long ID);

    int updateByPrimaryKeySelective(GoodsClassifyCommission record);

    int updateByPrimaryKey(GoodsClassifyCommission record);

    //根据clazzID得到val
    GoodsClassifyCommission getValByClassID(@Param(value = "clazzID") String clazzID, @Param(value = "companyID") Long companyID);
    //修改对应的扣点
    int updateByClazzID(GoodsClassifyCommission goodsClassifyCommission);
    //查询 看是否存在
    GoodsClassifyCommission selectByClazzID(@Param(value = "clazzID") String clazzID, @Param(value = "companyID") Long companyID);

    List<ClazzValDto>  selectByClazzIDList(Map<String,Object> map);

    int insertImage(ClazzImageDto imageDto);

    int updateImage(ClazzImageDto imageDto);

    int selectBySubjectID(@Param(value = "subjectID")Long subjectID,@Param(value = "companyID") Long companyID);

    int updateBySubjectID(ClazzImageDto imageDto);

    int updateByDiscountRateList(List<ClazzRateVo> list);

    GoodsClassifyCommission selectModelByClazzID(@Param(value = "clazzID") String clazzID, @Param(value = "companyID") Long companyID);

    int deleteByCompanyID(Long companyID);

    List<GoodsClassifyCommission> selectAllByCompanyID(@Param(value = "companyID")Long companyID);
}